import request from '@/utils/request'

export function addRebateLevel(rebateLevelId, rebateLevelRatio, rebateLevelTeam, rebateTeamRatio, totalTradingVolume, rebateWxpay, rebateKjpay) {
  return request({
    url: '/RebateLevel/',
    method: 'post',
    data: {
      rebateLevelId: rebateLevelId,
      rebateLevelRatio: rebateLevelRatio,
      rebateLevelTeam: rebateLevelTeam,
      rebateTeamRatio: rebateTeamRatio,
      rebateWxpay: rebateWxpay,
      rebateKjpay: rebateKjpay,
      totalTradingVolume: totalTradingVolume

    }
  })
}

export function getAllRebateLevel() {
  return request({
    url: '/RebateLevel/all',
    method: 'get'
  })
}

export function getRebateLevelById(id) {
  return request({
    url: '/RebateLevel/one',
    method: 'get',
    params: {
      Id: id
    }
  })
}

export function updateRebateLevel(rebateLevelId, rebateLevelRatio, rebateLevelTeam, rebateTeamRatio, totalTradingVolume, rebateWxpay, rebateKjpay) {
  return request({
    url: '/RebateLevel/',
    method: 'put',
    params: {
      rebateLevelId: rebateLevelId,
      rebateLevelRatio: rebateLevelRatio,
      rebateLevelTeam: rebateLevelTeam,
      rebateTeamRatio: rebateTeamRatio,
      rebateWxpay: rebateWxpay,
      rebateKjpay: rebateKjpay,
      totalTradingVolume: totalTradingVolume
    }
  })
}

export function deleteRebateLevel(id) {
  return request({
    url: '/RebateLevel/',
    method: 'delete',
    params: {
      id: id
    }
  })
}
